




var mainVisualAltStyle = ''
+'<style type="text/css">'
+'#main-photo-alt {visibility: hidden;}'
+'</style>';

document.write(mainVisualAltStyle);






$(function(){




if (jQuery.browser.msie) {

    var zIndexNumber = 1000;
    $('div').each(function() {
        $(this).css('zIndex', zIndexNumber);
        zIndexNumber -= 10;
    });

}


var duration = 2000;

var delay = 5000;

var imgs = [
	{
		'path' : '/imgs/index_ph01.jpg',
		'alt' : ''
	},
	{
		'path' : '/imgs/index_ph02.jpg',
		'alt' : ''
	},
	{
		'path' : '/imgs/index_ph03.jpg',
		'alt' : ''
	},
	{
		'path' : '/imgs/index_ph04.jpg',
		'alt' : ''
	},
	{
		'path' : '/imgs/index_ph05.jpg',
		'alt' : ''
	}
];

var $target = $("#main-photo");


var zindex = 100;

var maxLen = imgs.length;

var curIndex = 0;

var idNum = 1;

var imgEle = "";



$.each(imgs, function(){
	var photo = this;
	var z = zindex--;
	var img = '<img src="' + photo.path + '" alt="' + photo.alt + '" id="photo'+ idNum +'" style="display: none;z-index: '+ z +'" />';
	//$target.append( $(img).css({'z-index': z, 'display': 'none', 'filter': 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+ photo.path +'", sizingMethod="crop", enabled="true");'}) );

	//$target.append( $(img).css({'z-index': z, 'display': 'none'}) );

	imgEle += img;
	idNum++;
});


$target.html( imgEle );


var ttid = setTimeout(function(){

//	$(document).pngFix();
	exec();
}, 500);


function exec() {
	//alert(curIndex);
	var img = $target.children().eq(curIndex);

	img.fadeIn(1000, function(){
		var tid = setTimeout(function(){
			img.fadeOut(1000, function(){
				curIndex++;
				curIndex = (curIndex>=maxLen)? 0 : curIndex;
				exec();
			});
		}, 3000);
	
	});
}



});






